package lego.jbv;

public class BumperStatus {
	private boolean objectToLeft;
	private boolean objectInCenter;
	private boolean objectToRight;
	
	public boolean isObjectToLeft() {
		return objectToLeft;
	}
	public void setObjectToLeft() {
		this.objectToLeft = true;
		this.objectInCenter = false;
		this.objectToRight = false;
	}
	public boolean isObjectInCenter() {
		return objectInCenter;
	}
	public void setObjectInCenter() {
		this.objectToLeft = false;
		this.objectInCenter = true;
		this.objectToRight = false;
	}
	public boolean isObjectToRight() {
		return objectToRight;
	}
	public void setObjectToRight() {
		this.objectToLeft = false;
		this.objectInCenter = false;
		this.objectToRight = true;
	}
	
	public void noObjects()
	{
		this.objectToLeft = false;
		this.objectInCenter = false;
		this.objectToRight = false;
	}
	
	public boolean isBlocked()
	{
		return objectToLeft || objectInCenter || objectToRight;
	}
}
